package com.wkr.factory;

import com.wkr.bean.Apple;
import com.wkr.bean.Banana;
import com.wkr.bean.Fruit;

/**
 * 枚举类实现对外接口功能
 * 水果工厂
 */
public enum FruitFactory implements IBaseFactory {
    APPLE {
        @Override
        public Fruit getInstance() {
            return new Apple("Apple");
        }
    },

    BANANA {
        @Override
        public Fruit getInstance() {
            return new Banana("Banana");
        }
    };
}
